package cn.idietrade.idietradelogisticsmanage8007.demo.service.impl;

import cn.idietrade.common.pojo.SecondGoods;
import cn.idietrade.common.pojo.SecondLogisticsCompany;
import cn.idietrade.idietradelogisticsmanage8007.demo.mapper.CompanyManageMapper;
import cn.idietrade.idietradelogisticsmanage8007.demo.service.CompanyManageService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 作者：李永康
 * @createTime 2022/12/5 15:07
 * @description 描述
 */
@Service
public class CompanyManageServiceImpl implements CompanyManageService {
    @Resource
    private CompanyManageMapper companyManageMapper;
    @Override
    public int companyState(Integer id) {
        return companyManageMapper.companyState(id);
    }

    @Override
    public PageInfo<SecondLogisticsCompany> queryAll(Integer pageNum,Integer pageSize ) {


        PageHelper.startPage(pageNum,pageSize);
        List<SecondLogisticsCompany> list = companyManageMapper.queryAll();
        return new PageInfo<SecondLogisticsCompany>(list);
    }
}
